package com.dan.controller;

import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/devops")
public class MainController {

    @GetMapping("/test")
    public Object test() {
        Map<String, Object> map = new HashMap<>();
        map.put("status", 200);
        map.put("message", "SUCCESS ACCESS !");
        log.info(JSONUtil.toJsonStr(map));
        return JSONUtil.toJsonStr(map);
    }
}
